import request from '@/utils/request'

// 查询供应商列表
export function listType(query) {
    return request({
        url: '/admin/Item/page',
        method: 'get',
        params: query
    })
}

// 新增供应商类型
export function getListAllCategory() {
    return request({
        url: '/admin/ItemCategory/listAll',
        method: 'get',
        params: ''
    })
}

//Supplier
export function getListAllSupplier() {
    return request({
        url: '/admin/Supplier/listAll',
        method: 'get',
        params: ''
    })
}


export function updateStatus(query) {
    return request({
        url: '/admin/Item/updateStatus',
        method: 'get',
        params: query
    })
}


export function addType(data) {
    return request({
        url: '/admin/Item/add',
        method: 'post',
        data: data
    })
}


export function getType(dictId) {
    return request({
        url: '/admin/Item/' + dictId,
        method: 'get'
    })
}

export function updateType(data) {
    return request({
        url: '/admin/Item/update',
        method: 'post',
        data: data
    })
}


export function delType(dictId) {
    return request({
        url: '/admin/Item/' + dictId,
        method: 'delete'
    })
}

